uscore-prepend all the stuff in here.
authorHavoc Pennington <hp@redhat.com>
Mon, 1 Jan 2001 20:26:10 +0000 (20:26 +0000)
committerHavoc Pennington <hp@src.gnome.org>
Mon, 1 Jan 2001 20:26:10 +0000 (20:26 +0000)
2001-01-01  Havoc Pennington  <hp@redhat.com>

* gtk/gtktexttagprivate.h: uscore-prepend all the stuff in here.

* gtk/gtk-boxed.defs (GtkTextAttributes): Add boxed type for
GtkTextAttributes

* gtk/gtktexttag.c: Fix up GtkTextAttributes copying to close bug
#40246
(gtk_text_attributes_copy_values): rename from
gtk_text_attributes_copy
(gtk_text_attributes_copy): a more standard GTK copy function,
which returns a new object

14 files changed:
ChangeLog
ChangeLog.pre-2-0
ChangeLog.pre-2-10
ChangeLog.pre-2-2
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
gtk/gtk-boxed.defs
gtk/gtktextbtree.c
gtk/gtktextiter.c
gtk/gtktextlayout.c
gtk/gtktexttag.c
gtk/gtktexttag.h
gtk/gtktexttagprivate.h

index aa0d86b73fe0d23bba4825d96d864b653acb82c2..c8ee87334c8c41e36e75be3b7810d5f7c6c47573 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2001-01-01  Havoc Pennington  <hp@redhat.com>
+
+       * gtk/gtktexttagprivate.h: uscore-prepend all the stuff in here.
+
+       * gtk/gtk-boxed.defs (GtkTextAttributes): Add boxed type for 
+       GtkTextAttributes
+
+       * gtk/gtktexttag.c: Fix up GtkTextAttributes copying to close bug 
+       #40246
+       (gtk_text_attributes_copy_values): rename from 
+       gtk_text_attributes_copy
+       (gtk_text_attributes_copy): a more standard GTK copy function, 
+       which returns a new object
+
 2001-01-01  Havoc Pennington  <hp@redhat.com>
 
        * gtk/gtktreeview.c: Adapt to GtkTreeSelection changes
index aa0d86b73fe0d23bba4825d96d864b653acb82c2..c8ee87334c8c41e36e75be3b7810d5f7c6c47573 100644 (file)
@@ -1,3 +1,17 @@
+2001-01-01  Havoc Pennington  <hp@redhat.com>
+
+       * gtk/gtktexttagprivate.h: uscore-prepend all the stuff in here.
+
+       * gtk/gtk-boxed.defs (GtkTextAttributes): Add boxed type for 
+       GtkTextAttributes
+
+       * gtk/gtktexttag.c: Fix up GtkTextAttributes copying to close bug 
+       #40246
+       (gtk_text_attributes_copy_values): rename from 
+       gtk_text_attributes_copy
+       (gtk_text_attributes_copy): a more standard GTK copy function, 
+       which returns a new object
+
 2001-01-01  Havoc Pennington  <hp@redhat.com>
 
        * gtk/gtktreeview.c: Adapt to GtkTreeSelection changes
index aa0d86b73fe0d23bba4825d96d864b653acb82c2..c8ee87334c8c41e36e75be3b7810d5f7c6c47573 100644 (file)
@@ -1,3 +1,17 @@
+2001-01-01  Havoc Pennington  <hp@redhat.com>
+
+       * gtk/gtktexttagprivate.h: uscore-prepend all the stuff in here.
+
+       * gtk/gtk-boxed.defs (GtkTextAttributes): Add boxed type for 
+       GtkTextAttributes
+
+       * gtk/gtktexttag.c: Fix up GtkTextAttributes copying to close bug 
+       #40246
+       (gtk_text_attributes_copy_values): rename from 
+       gtk_text_attributes_copy
+       (gtk_text_attributes_copy): a more standard GTK copy function, 
+       which returns a new object
+
 2001-01-01  Havoc Pennington  <hp@redhat.com>
 
        * gtk/gtktreeview.c: Adapt to GtkTreeSelection changes
index aa0d86b73fe0d23bba4825d96d864b653acb82c2..c8ee87334c8c41e36e75be3b7810d5f7c6c47573 100644 (file)
@@ -1,3 +1,17 @@
+2001-01-01  Havoc Pennington  <hp@redhat.com>
+
+       * gtk/gtktexttagprivate.h: uscore-prepend all the stuff in here.
+
+       * gtk/gtk-boxed.defs (GtkTextAttributes): Add boxed type for 
+       GtkTextAttributes
+
+       * gtk/gtktexttag.c: Fix up GtkTextAttributes copying to close bug 
+       #40246
+       (gtk_text_attributes_copy_values): rename from 
+       gtk_text_attributes_copy
+       (gtk_text_attributes_copy): a more standard GTK copy function, 
+       which returns a new object
+
 2001-01-01  Havoc Pennington  <hp@redhat.com>
 
        * gtk/gtktreeview.c: Adapt to GtkTreeSelection changes
index aa0d86b73fe0d23bba4825d96d864b653acb82c2..c8ee87334c8c41e36e75be3b7810d5f7c6c47573 100644 (file)
@@ -1,3 +1,17 @@
+2001-01-01  Havoc Pennington  <hp@redhat.com>
+
+       * gtk/gtktexttagprivate.h: uscore-prepend all the stuff in here.
+
+       * gtk/gtk-boxed.defs (GtkTextAttributes): Add boxed type for 
+       GtkTextAttributes
+
+       * gtk/gtktexttag.c: Fix up GtkTextAttributes copying to close bug 
+       #40246
+       (gtk_text_attributes_copy_values): rename from 
+       gtk_text_attributes_copy
+       (gtk_text_attributes_copy): a more standard GTK copy function, 
+       which returns a new object
+
 2001-01-01  Havoc Pennington  <hp@redhat.com>
 
        * gtk/gtktreeview.c: Adapt to GtkTreeSelection changes
index aa0d86b73fe0d23bba4825d96d864b653acb82c2..c8ee87334c8c41e36e75be3b7810d5f7c6c47573 100644 (file)
@@ -1,3 +1,17 @@
+2001-01-01  Havoc Pennington  <hp@redhat.com>
+
+       * gtk/gtktexttagprivate.h: uscore-prepend all the stuff in here.
+
+       * gtk/gtk-boxed.defs (GtkTextAttributes): Add boxed type for 
+       GtkTextAttributes
+
+       * gtk/gtktexttag.c: Fix up GtkTextAttributes copying to close bug 
+       #40246
+       (gtk_text_attributes_copy_values): rename from 
+       gtk_text_attributes_copy
+       (gtk_text_attributes_copy): a more standard GTK copy function, 
+       which returns a new object
+
 2001-01-01  Havoc Pennington  <hp@redhat.com>
 
        * gtk/gtktreeview.c: Adapt to GtkTreeSelection changes
index aa0d86b73fe0d23bba4825d96d864b653acb82c2..c8ee87334c8c41e36e75be3b7810d5f7c6c47573 100644 (file)
@@ -1,3 +1,17 @@
+2001-01-01  Havoc Pennington  <hp@redhat.com>
+
+       * gtk/gtktexttagprivate.h: uscore-prepend all the stuff in here.
+
+       * gtk/gtk-boxed.defs (GtkTextAttributes): Add boxed type for 
+       GtkTextAttributes
+
+       * gtk/gtktexttag.c: Fix up GtkTextAttributes copying to close bug 
+       #40246
+       (gtk_text_attributes_copy_values): rename from 
+       gtk_text_attributes_copy
+       (gtk_text_attributes_copy): a more standard GTK copy function, 
+       which returns a new object
+
 2001-01-01  Havoc Pennington  <hp@redhat.com>
 
        * gtk/gtktreeview.c: Adapt to GtkTreeSelection changes
index 83fc8d8d469d43cf897b086d69e184c9c286e1ff..f995e0615f8d6dc7c07b19699d364c5d41cdd675 100644 (file)
   gtk_text_iter_copy
   gtk_text_iter_free)
 
+
+(define-boxed GtkTextAttributes
+  gtk_text_attributes_ref
+  gtk_text_attributes_unref)
+
 (define-boxed PangoTabArray
   pango_tab_array_copy
   pango_tab_array_free)
index 97ea5ab425c0a7af5a2978b088f6dded169c803d..93695fa51543d5bf52900b50da9f4532e5907d8d 100644 (file)
@@ -1539,12 +1539,11 @@ queue_tag_redisplay (GtkTextBTree      *tree,
                      const GtkTextIter *start,
                      const GtkTextIter *end)
 {
-  if (gtk_text_tag_affects_size (tag))
+  if (_gtk_text_tag_affects_size (tag))
     {
       _gtk_text_btree_invalidate_region (tree, start, end);
-
     }
-  else if (gtk_text_tag_affects_nonsize_appearance (tag))
+  else if (_gtk_text_tag_affects_nonsize_appearance (tag))
     {
       /* We only need to queue a redraw, not a relayout */
       redisplay_region (tree, start, end);
index 755fc033b2cc98f65c9a141d4d77216ff88eaa27..eb6e2c3233e9447aec326f69411ea106ebd98f5b 100644 (file)
@@ -1207,7 +1207,7 @@ gtk_text_iter_get_tags (const GtkTextIter *iter)
     }
 
   /* Sort tags in ascending order of priority */
-  gtk_text_tag_array_sort (tags, tag_count);
+  _gtk_text_tag_array_sort (tags, tag_count);
 
   retval = NULL;
   i = 0;
@@ -1544,11 +1544,11 @@ gtk_text_iter_get_attributes (const GtkTextIter  *iter,
     }
 
   /* Sort tags in ascending order of priority */
-  gtk_text_tag_array_sort (tags, tag_count);
+  _gtk_text_tag_array_sort (tags, tag_count);
 
-  gtk_text_attributes_fill_from_tags (values,
-                                      tags,
-                                      tag_count);
+  _gtk_text_attributes_fill_from_tags (values,
+                                       tags,
+                                       tag_count);
 
   g_free (tags);
 
index 2ee16058cf74c297a0bad2d3da1b499067e0fd91..71c610ef401b7011f744a2af76e53cbb73e1fa79 100644 (file)
@@ -945,16 +945,16 @@ get_style (GtkTextLayout *layout,
     }
 
   /* Sort tags in ascending order of priority */
-  gtk_text_tag_array_sort (tags, tag_count);
+  _gtk_text_tag_array_sort (tags, tag_count);
 
   style = gtk_text_attributes_new ();
 
-  gtk_text_attributes_copy (layout->default_style,
-                            style);
+  gtk_text_attributes_copy_values (layout->default_style,
+                                   style);
 
-  gtk_text_attributes_fill_from_tags (style,
-                                      tags,
-                                      tag_count);
+  _gtk_text_attributes_fill_from_tags (style,
+                                       tags,
+                                       tag_count);
 
   g_free (tags);
 
index 794536439b324f6a076903b73783e02d2ea6a7b4..fd36a510bb35288b6d1e8a586c565a1eab6c4038 100644 (file)
@@ -1587,8 +1587,8 @@ tag_sort_func (gconstpointer first, gconstpointer second)
 }
 
 void
-gtk_text_tag_array_sort (GtkTextTag** tag_array_p,
-                         guint len)
+_gtk_text_tag_array_sort (GtkTextTag** tag_array_p,
+                          guint len)
 {
   int i, j, prio;
   GtkTextTag **tag;
@@ -1664,10 +1664,28 @@ gtk_text_attributes_new (void)
   return values;
 }
 
-/* FIXME change the signature of this to be correct */
+GtkTextAttributes*
+gtk_text_attributes_copy (GtkTextAttributes *src)
+{
+  GtkTextAttributes *dest;
+
+  dest = gtk_text_attributes_new ();
+  gtk_text_attributes_copy_values (src, dest);
+
+  return dest;
+}
+
+/**
+ * gtk_text_attributes_copy_values:
+ * @src: a #GtkTextAttributes
+ * @dest: another #GtkTextAttributes
+ * 
+ * Copies the values from @src to @dest so that @dest has the same values
+ * as @src.
+ **/
 void
-gtk_text_attributes_copy (GtkTextAttributes *src,
-                          GtkTextAttributes *dest)
+gtk_text_attributes_copy_values (GtkTextAttributes *src,
+                                 GtkTextAttributes *dest)
 {
   guint orig_refcount;
 
@@ -1754,9 +1772,9 @@ gtk_text_attributes_unref (GtkTextAttributes *values)
 }
 
 void
-gtk_text_attributes_realize (GtkTextAttributes *values,
-                             GdkColormap *cmap,
-                             GdkVisual *visual)
+_gtk_text_attributes_realize (GtkTextAttributes *values,
+                              GdkColormap *cmap,
+                              GdkVisual *visual)
 {
   g_return_if_fail (values != NULL);
   g_return_if_fail (values->refcount > 0);
@@ -1775,9 +1793,9 @@ gtk_text_attributes_realize (GtkTextAttributes *values,
 }
 
 void
-gtk_text_attributes_unrealize (GtkTextAttributes *values,
-                               GdkColormap *cmap,
-                               GdkVisual *visual)
+_gtk_text_attributes_unrealize (GtkTextAttributes *values,
+                                GdkColormap *cmap,
+                                GdkVisual *visual)
 {
   g_return_if_fail (values != NULL);
   g_return_if_fail (values->refcount > 0);
@@ -1797,9 +1815,9 @@ gtk_text_attributes_unrealize (GtkTextAttributes *values,
 }
 
 void
-gtk_text_attributes_fill_from_tags (GtkTextAttributes *dest,
-                                    GtkTextTag**       tags,
-                                    guint              n_tags)
+_gtk_text_attributes_fill_from_tags (GtkTextAttributes *dest,
+                                     GtkTextTag**       tags,
+                                     guint              n_tags)
 {
   guint n = 0;
 
@@ -1926,7 +1944,7 @@ gtk_text_attributes_fill_from_tags (GtkTextAttributes *dest,
 }
 
 gboolean
-gtk_text_tag_affects_size (GtkTextTag *tag)
+_gtk_text_tag_affects_size (GtkTextTag *tag)
 {
   g_return_val_if_fail (GTK_IS_TEXT_TAG (tag), FALSE);
 
@@ -1952,7 +1970,7 @@ gtk_text_tag_affects_size (GtkTextTag *tag)
 }
 
 gboolean
-gtk_text_tag_affects_nonsize_appearance (GtkTextTag *tag)
+_gtk_text_tag_affects_nonsize_appearance (GtkTextTag *tag)
 {
   g_return_val_if_fail (GTK_IS_TEXT_TAG (tag), FALSE);
 
index 0e7ef962102b2d98f530ebf8a30ac70d7c5bcd06..2b92cda9685c6a3fecada782b2372caffa934da7 100644 (file)
@@ -195,12 +195,13 @@ struct _GtkTextAttributes
   guint pad4 : 1;
 };
 
-/* FIXME _copy() has the wrong signature */
-GtkTextAttributes  *gtk_text_attributes_new       (void);
-void                gtk_text_attributes_copy      (GtkTextAttributes *src,
-                                                   GtkTextAttributes *dest);
-void                gtk_text_attributes_unref     (GtkTextAttributes *values);
-void                gtk_text_attributes_ref       (GtkTextAttributes *values);
+GtkTextAttributes* gtk_text_attributes_new         (void);
+GtkTextAttributes* gtk_text_attributes_copy        (GtkTextAttributes *src);
+void               gtk_text_attributes_copy_values (GtkTextAttributes *src,
+                                                    GtkTextAttributes *dest);
+void               gtk_text_attributes_unref       (GtkTextAttributes *values);
+void               gtk_text_attributes_ref         (GtkTextAttributes *values);
+
 
 #ifdef __cplusplus
 }
index 3e95017af9015fc36d9a129631eb337e61ae4a90..a7305f5c428eab184e77ca9c1e07e329c9864369 100644 (file)
@@ -7,23 +7,23 @@
  * the defaults with settings in the given tags, which should be sorted in
  * ascending order of priority
 */
-void gtk_text_attributes_fill_from_tags   (GtkTextAttributes   *values,
-                                           GtkTextTag         **tags,
-                                           guint                n_tags);
-void gtk_text_tag_array_sort              (GtkTextTag         **tag_array_p,
-                                           guint                len);
+void _gtk_text_attributes_fill_from_tags   (GtkTextAttributes   *values,
+                                            GtkTextTag         **tags,
+                                            guint                n_tags);
+void _gtk_text_tag_array_sort              (GtkTextTag         **tag_array_p,
+                                            guint                len);
 
 /* ensure colors are allocated, etc. for drawing */
-void                gtk_text_attributes_realize   (GtkTextAttributes *values,
-                                                   GdkColormap       *cmap,
-                                                   GdkVisual         *visual);
+void                _gtk_text_attributes_realize   (GtkTextAttributes *values,
+                                                    GdkColormap       *cmap,
+                                                    GdkVisual         *visual);
 
 /* free the stuff again */
-void                gtk_text_attributes_unrealize (GtkTextAttributes *values,
-                                                   GdkColormap       *cmap,
-                                                   GdkVisual         *visual);
+void                _gtk_text_attributes_unrealize (GtkTextAttributes *values,
+                                                    GdkColormap       *cmap,
+                                                    GdkVisual         *visual);
 
-gboolean gtk_text_tag_affects_size               (GtkTextTag *tag);
-gboolean gtk_text_tag_affects_nonsize_appearance (GtkTextTag *tag);
+gboolean _gtk_text_tag_affects_size               (GtkTextTag *tag);
+gboolean _gtk_text_tag_affects_nonsize_appearance (GtkTextTag *tag);
 
 #endif